import { ref } from "vue";

export function useRandom(){

  const color = ref("#ccc");

  function random(a,b){
    return Math.round(Math.random()*(a-b)+b);
  }

  function randomColor(){
    return `rgb(${random(0,255)},${random(0,255)},${random(0,255)})`;
  }

  color.value = randomColor();

  return { color, random, randomColor };
}
